<script type="text/javascript" src="<?php echo base_url() . SKINSPATH; ?>js/jquery.timepicker/jquery-ui-timepicker-addon.js"></script>
<link rel="stylesheet" href="<?php echo base_url() . SKINSPATH; ?>js/jquery.timepicker/jquery-ui-timepicker-addon.css" type="text/css"/>
<div class="content-box">
    <div class="box-header clear">
        <h2><?php echo lang('pg_edit_member') ?></h2>
    </div>
    <div class="box-body clear">
        <?php echo validation_errors(); ?>
            <?php echo form_open(base_url().'member/edit/'.$member->id); ?>
            <div class="form-field clear">
                <label class="form-label fl-space2"><?php echo lang('lbl_email') ?> :(<span class="required">*</span>)</label>
                <input type="text" value="<?php echo set_value('email',$member->email); ?>" name="email" class="text small" id="email" maxlength="45" />
            </div>
            <div class="form-field clear">
                <label class="form-label fl-space2"><?php echo lang('lbl_password') ?></label>
                <input type="password" value="<?php echo set_value('password'); ?>" name="password" class="text small">
            </div>
            <div class="form-field clear">
                <label class="form-label fl-space2"><?php echo lang('lbl_frm_password') ?></label>
                <input type="password" value="<?php echo set_value('passconf'); ?>" name="passconf" class="text small">
            </div>
            <div class="form-field clear">
	            <label class="form-label fl-space2"><?php echo lang('lbl_gender') ?> :</label>
	            <?php echo form_dropdown('gender', $gender, $member->gender); ?>
	        </div>
            <div class="form-field clear">
                <label class="form-label fl-space2"><?php echo lang('lbl_first_name') ?>  :(<span class="required">*</span>)</label>
                <input type="text" value="<?php echo set_value('first_name',$member->first_name); ?>" name="first_name" class="text small">
            </div>
            <div class="form-field clear">
                <label class="form-label fl-space2"><?php echo lang('lbl_last_name') ?> :(<span class="required">*</span>)</label>
                <input type="text" value="<?php echo set_value('last_name',$member->last_name); ?>" name="last_name" class="text small">
            </div>
            <div class="form-field clear">
                <label class="form-label fl-space2"><?php echo lang('lbl_address') ?> </label>
                <input type="text" value="<?php echo set_value('address',$member->address); ?>" name="address" class="text small" id="address" maxlength="45" />
            </div>
            <div class="form-field clear">
                <label class="form-label fl-space2"><?php echo lang('lbl_house_number') ?> </label>
                <input type="text" value="<?php echo set_value('house_number',$member->house_number); ?>" name="house_number" class="text small" id="house_number" maxlength="45" />
            </div>
            <div class="form-field clear">
                <label class="form-label fl-space2"><?php echo lang('lbl_postcode') ?> </label>
                <input type="text" value="<?php echo set_value('postcode',$member->postcode); ?>" name="postcode" class="text small" id="postcode" maxlength="45" />
            </div>
            <div class="form-field clear">
                <label class="form-label fl-space2"><?php echo lang('lbl_place') ?> </label>
                <input type="text" value="<?php echo set_value('place',$member->place); ?>" name="place" class="text small" id="place" maxlength="45" />
            </div>
            <div class="form-field clear">
                <label class="form-label fl-space2"><?php echo lang('lbl_phone') ?> </label>
                <input type="text" value="<?php echo set_value('phone',$member->phone); ?>" name="phone" class="text small" id="phone" maxlength="45"/>
            </div>
            <div class="form-field clear">
                <label class="form-label fl-space2"><?php echo lang('lbl_birthday') ?> </label>
                <input type="text" value="<?php echo set_value('birthday',$member->birthday); ?>" name="birthday" class="text small" id="birthday" maxlength="45" />
            </div>
            <div class="form-field clear">
                <label class="form-label fl-space2"><?php echo lang('lbl_owner') ?> </label>
                <select name="owner">
                <option value="0"><?php echo lang('lbl_my_owner');?></option>
                <?php 
                foreach($owners as $item){
					echo "<option value='".$item->id."' ".($item->id == $member->owner ? "selected='selected'":"").">".$item->username."</option>";
				}
                ?>
                </select>
            </div>
            <div class="form-field clear">
                <label class="form-label fl-space2"><?php echo lang('lbl_death') ?> </label>
                <input type="checkbox" value="1" name="owner" />
            </div>
			<div class="form-field clear">
	            <label class="form-label fl-space2"><?php echo lang('lbl_status') ?> :</label>
	            <?php echo form_dropdown('status', $status, '0'); ?>
	        </div>
            <div class="form_submit">
                <input type="submit" class="submit" value="<?php echo lang('btn_save') ?>" id="save" name="save">
                <input onclick='location.href="<?php echo base_url() ?>member"' type="button" class="submit" value="<?php echo lang('btn_cancel') ?>" name="cancel">
            </div>
        <?php echo form_close();?>
    </div>
</div>
<script type="text/javascript">
    $('#birthday').datetimepicker({
        dateFormat: "yy/mm/dd"
    });
</script>